//使用RTK来构建store
// createSlice 创建reducer切片
// 它需要一个配置对象作为参数，通过对象的不同属性来制定它的配置
import { configureStore } from '@reduxjs/toolkit';
import { schoolReducer } from './schoolSlice';
import { stuReducer } from './stuSlice';


//创建store 用来创建store对象，需要一个配置对象作为参数
const store = configureStore({
  // reducer: stuSlice.reducer// 单个
  reducer: {
    // 多个
    // xxx:xxxSlice.reducer
    student: stuReducer,
    school: schoolReducer
  }
});
export default store